package com.nineclock.document.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.document.pojo.DocFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DocFileMapper extends BaseMapper<DocFile> {
    @Select("select f.* from doc_file f inner join doc_collaborations c on f.id = c.file_id where f.folder_id = #{folderId} and\n" +
            "c.collaboration_id = #{collaborationId} and f.status = 1 and f.company_id = #{companyId}")
    List<DocFile> selectListByCollaboration(@Param("companyId") Long companyId,@Param("collaborationId") Long collaborationId,@Param("folderId") Long folderId);
}
